CQG API Documentation 4.0 - Revised
Study Strings
Send Feedback

Glossary Item Box

These study strings can be used to formulate the CQGExpressionRequest.AddSubExpression method's sub_expression parameter.

Please note that strings must be entered in one line.

Study Name String Entry
Basic Charting
Bar
Open Open(DJI)
High High(DJI)
Low Low(DJI)
Close Close(DJI)
Mid Mid(DJI)
HLC3 HLC3(DJI)
Avg Avg(DJI)
TrueHigh TRUHI(DJI)
TrueLow TRULO(DJI)
Range Range(DJI)
TrueRange TRURNG(DJI)
Missing Bar Count MBCnt(DJI)
ConstantVolume Bar
CVOpen CVOpen(DJI)
CVHigh CVHigh(DJI)
CVLow CVLow(DJI)
CVClose CVClose(DJI)
CVMid CVMid(DJI)
CVHLC3 CVHLC3(DJI)
CVAvg CVAvg(DJI)
CVTrueHigh CVTrueHigh(DJI)
CVTrueLow CVTrueLow(DJI)
CVRange CVRange(DJI)
CVTrueRange CVTrueRange(DJI)
Equalize Sessions
ESOpen ESOpen(DJI,Display:=Bar)
ESHigh ESHigh(DJI,Display:=Bar)
ESLow ESLow(DJI,Display:=Bar)
ESClose ESClose(DJI,Display:=Bar)
ESMid ESMid(DJI,Display:=Bar)
ESHLC3 ESHLC3(DJI,Display:=Bar)
ESAvg ESAvg(DJI,Display:=Bar)
ESRange ESRange(DJI,Display:=Bar)
Fill Gap
FGOpen FGOpen(DJI,Display:=Bar)
FGHigh FGHigh(DJI,Display:=Bar)
FGLow FGLow(DJI,Display:=Bar)
FGClose FGClose(DJI,Display:=Bar)
FGMid FGMid(DJI,Display:=Bar)
FGHLC3 FGHLC3(DJI,Display:=Bar)
FGAvg FGAvg(DJI,Display:=Bar)
FGRange FGRange(DJI,Display:=Bar)
NoGap Bar
NGOpen NGOpen(DJI,RemoveFrom:=#2)
NGHigh NGHigh(DJI,RemoveFrom:=#2)
NGLow NGLow(DJI,RemoveFrom:=#2)
NGClose NGClose(DJI,RemoveFrom:=#2)
NGMid NGMid(DJI,RemoveFrom:=#2)
NGHLC3 NGHLC3(DJI,RemoveFrom:=#2)
NGAvg NGAvg(DJI,RemoveFrom:=#2)
NGTrueHigh NGTrueHigh(DJI,RemoveFrom:=2)
NGTrueLow NGTrueLow(DJI,RemoveFrom:=2)
NGRange NGRange(DJI,RemoveFrom:=2)
NGTrueRange NGTrueRange(DJI,RemoveFrom:=2)
Percent Bar
PCOpen PCOpen(DJI,Base:=20,BaseType:=0)
PCHigh PCHigh(DJI,Base:=20,BaseType:=0)
PCLow PCLow(DJI,Base:=20,BaseType:=0)
PCClose PCClose(DJI,Base:=20,BaseType:=0)
PCMid PCMid(DJI,Base:=20,BaseType:=0)
PCHLC3 PCHLC3(DJI,Base:=20,BaseType:=0)
PCAvg PCAvg(DJI,Base:=20,BaseType:=0)
PCTrueHigh PCTrueHigh(DJI,Base:=20,BaseType:=0)
PCTrueLow PCTrueLow(DJI,Base:=20,BaseType:=0)
PCRange PCRange(DJI,Base:=20,BaseType:=0)
PCTrueRange PCTrueRange(DJI,Base:=20,BaseType:=0)
Point and Figure Bar
PFMid PFMid(DJI)
PFHigh PFHigh(DJI,BoxSize:=1,Reversal:=3)
PFLow PFLow(DJI,BoxSize:=1,Reversal:=3)
PFUp PFUp(DJI,BoxSize:=1,Reversal:=3)
TickChart Bar
Tick Tick(DJI,FlatTicks:=1)
TFlow
TFlow TFlow(DJI)
TFlow On Balance Volume TFOBV(DJI)
VolOl Bar
Vol Vol(DJI)[-2]
TickVol TickVol(DJI)
Yield Bar
YieldOpen YieldOpen(US)
YieldHigh YieldHigh(US)
YieldLow YieldLow(US)
YieldClose YieldClose(US)
YieldMid YieldMid(US)
YieldHLC3 YieldHLC3(US)
YieldAvg YieldAvg(US)
YieldTrueHigh YieldTrueHigh(US)
YieldTrueLow YieldTrueLow(US)
YieldRange YieldRange(US)
YieldTrueRange YieldTrueRange(US)
Basic Studies
Acc Dist
Accumulation/Distribution A_D(DJI)[0]
Acc Swing
Accumulative Swing Index ASI(DJI,PriceLimit:=300)[0]
ADX
Average Directional Movement Index ADX(DJI,Period1:=4)[0]
Average True Range of ADX ADXATR(DJI,Period1:=4)[0]
Average True Range
Average True Range ATR(DJI,Type:=Sim,Period:=10)
Bollinger Bands
BBnd MA BMA(DJI,InputChoice:=Close,MAType:=Sim,Period1:=20)[0]
BBnd High BHI(DJI,InputChoice:=Close,MAType:=Sim,Period1:=20,Percent:=2.00)[0]
BBnd Low BLO(DJI,InputChoice:=Close,MAType:=Sim,Period1:=20,Percent:=2.00)[0]
Bollinger Diff
BDif BDIF(DJI,InputChoice:=Close,MAType:=Sim,Period1:=8,Percent:=1)[0]
CandleStick
CandleStick Formations CSForm(DJI,Trend1:=5,Trend2:=5,...,Trend8:=5,
Range7:=5,Range8:=5,...,Range12:=5)[0]
Channel
Chnl High CHI(DJI,Period1:=4)[0]
Chnl Low CLO(DJI,Period1:=4)[0]
CCI
Commodity Channel Index CCI(DJI,InputChoice:=Open,Period1:=10)[0]
Directional Movement Index
DMI Up DMIu(DJI,Period1:=10)[0]
DMI Down DMId(DJI,Period1:=10)[0]
Average True Range DMIATR(DJI,Period1:=10)[0]
Directional Movement Index Diff
DMI Diff DDIF(DJI,Period1:=10)[0]
Average True Range DDIFATR(DJI,Period1:=10)[0]
Elliot Wave
EW Major EWM(DJI,BarCount:=300)[0]
EW Intermediate EWI(DJI,BarCount:=300)[0]
EW Channel 1 EWCh1(DJI,BarCount:=300)[-3]
EW Channel 2 EWCh2(DJI,BarCount:=300)[0]
EW Channel 3 EWCh3(DJI,BarCount:=300)[0]
EW PTI EWPTI(DJI,BarCount:=300)[0]
EW Prj EWPrj(DJI,BarCount:=300)[0]
Historical Volatility
HVol HVOL(DJI,InputChoice:=Close,HvolType:=Percent,Period:=10)[0]
Keltner Channel
Kelt Center Line KCen(DJI,InputChoice:=Close,MAType:=Exp,Period:=21)[0]
Kelt High KHi(DJI,InputChoice:=Close,MAType:=Exp,Period:=21,MAType1:=Smo,Percent:=0)[0]
Kelt Low KLo(DJI,InputChoice:=Close,MAType:=Exp,Period:=21,MAType1:=Smo,Percent:=0)[0]
Level
Level High HiLevel(DJI,InputChoice1:=High,Period1:=20)[0]
Level Low LoLevel(DJI,InputChoice2:=Low,Period2:=20)[0]
Momentum
Mom Mom(DJI,InputChoice:=Close,Period:=10)[0]
Moving Average
MA MA(DJI,InputChoice:=Close,MAType:=Sim,Period:=21)[0]
MA Top Envelope: MATE(DJI,InputChoice:=Close,MAType:=Sim,Period:=21,Percent:=10)[0]
MA Bottom Envelope: MABE(DJI,InputChoice:=Close,MAType:=Sim,Period:=21,Percent:=10)[0]
Adaptive Moving Average
Adaptive Moving Average AMA(DJI,Offset:=0,ERPeriod:=10,FastPeriod:=2,SlowPeriod:=30)
Moving Average Convergence/Divergence
MACD MACD(DJI,InputChoice:=Close,Period1:=13,Period2:=26)[0]
MACDA MACDA(DJI,InputChoice:=Close,Period1:=13,Period2:=26,Period3:=9)[0]
Moving Average Cross
Moving Average Cross Max(DJI,Period:=21)
Moving Linear Regression
Moving Linear Regression MLR(DJI,Period:=22)
On Balance Volume
OBV OBV(DJI,InputChoice:=Close)[0]
On Balance Volume, Fancy
FOBV FOBV(DJI)[0]
Oscillator
OSC Osc(DJI,InputChoice1:=Close,MAType1:=Sim,Period1:=4,
InputChoice2:=Close,MAType2:=Sim,Period2:=8)[0]
Oscillator - MA of Oscillator
OSC - MA OSC OsMA(DJI,InputChoice1:=Close,MAType1:=Sim,Period1:=4,
InputChoice2:=Close,MAType2:=Sim,Period2:=8,MAType3:=Sim,Period3:=3)[0]
Oscillator 1 - Oscillator 2
OSC1 - OSC2 OsD(DJI,InputChoice1:=Close,MAType1:=Sim,Period1:=4, InputChoice2:=Close,
MAType2:=Sim,Period2:=8,InputChoice3:=Close, MAType3:=Sim,Period3:=8,
InputChoice4:=Close,MAType4:=Sim,Period4:=16)[0]
Oscillator Cross
Oscillator Cross OSC(DJI,MA1Type:=Sim,MA1Period:=4,MA2Period:=8,MA1Type:=Sim,Price:=Close)
Aroon Oscillator
Aroon Oscillator AroonOsc(DJI,Period:=14)
Parabolic
Para Para(DJI,StepValue:=0.020)[0]
Peak
Peak HiPeak HiPeak(DJI,InputChoice1:=High,Max1:=Max,Thresh1:=Thresh,
Reset1:=XA,LLev1:=LLev,RLev1:=RRlev)[0]
Peak HiCount HiCount(DJI,InputChoice1:=High,Max1:=Max,Thresh1:=Thresh,
Reset1:=XA,LLev1:=LLev,RLev1:=RRlev)[0]
Peak LoPeak LoPeak(DJI,InputChoice2:=Low,Max2:=Max,Thresh2:=Thresh,
Reset2:=XB,LLev2:=LLev,RLev2:=RRlev)[0]
Peak LoCount LoCount(DJI,InputChoice2:=Low,Max2:=Max,Thresh2:=Thresh,
Reset2:=XB,LLev2:=LLev,RLev2:=RRlev)[0]
Percent R
%R PCR(DJI,InputChoice:=Close,Period:=10)[0]
Rank
Rank Rank(DJI,Period:=100)
Rate Of Change
ROC ROC(DJI,InputChoice:=Close,Period:=10)[0]
Relative Strength Index
RSI RSI(DJI,InputChoice:=Close,Period:=9)[0]
Reversal
Reversal Rev(DJI,Bars:=1000,Rev:=1)
Square Root Deviation
Sq. Root Dev. SQRTDV(DJI,InputChoice:=Close,MAType:=Smo,Period1:=8)[0]
Standard Deviation
Std. Dev. STDDEV(DJI,InputChoice:=Close,Period1:=8)[0]
Stochastics, Fast
Fast %K FSK(DJI,InputChoice:=Close,Period1:=10)[0]
Fast %D FSD(DJI,InputChoice:=Close,MAType1:=Smo,Period1:=10,Period2:=3)[0]
Stochastics, Slow
Slow %K (Fast %D) SSK(DJI,InputChoice:=Close,MAType1:=Smo,Period1:=10,Period2:=3)[0]
Slow %D SSD(DJI,InputChoice:=Close,MAType1:=Smo,Period1:=10,
MAType2:=Smo,Period2:=3,Period3:=3)[0]
Summation
Summation over Period Sum(DJI,Period:=8)[0]
Accumulation Accum(DJI)[0]
Triple Exponential
Trix Trx(DJI,InputChoice:=Close,Period:=5)[0]
Volatility
Volatility Volat(DJI,Period1:=3)[0]
ZigZag
ZigZag ZZ(DJI)
Special enablements are required for use of these studies:
Tom Joseph Optimized Bands
OB MA OBMA(DJI,InputChoice:=Close,Period1:=21)[0]
OB HI OBHI(DJI,InputChoice:=Close,Period1:=21)[0]
OB LO OBLO(DJI,InputChoice:=Close,Period1:=21)[0]